package com.mvu.banana.domain.stub;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import com.mvu.banana.domain.impl.KeyableBean;
import javax.persistence.Entity;

@Entity
public class Thread extends KeyableBean{

  @ManyToOne
  @NotNull
  protected Forum forum;

  @NotNull
  protected String subject;

  @ManyToOne
  @NotNull
  protected Post posts;

  public static final String FORUM_PROP = "forum";

  public static final String SUBJECT_PROP = "subject";

  public static final String POSTS_PROP = "posts";

  public Forum getForum(){
    return forum;
  }

  public Thread setForum(Forum p0){
    this.forum = p0;
    return this;
  }

  public String getSubject(){
    return subject;
  }

  public Thread setSubject(String p0){
    this.subject = p0;
    return this;
  }

  public Post getPosts(){
    return posts;
  }

  public Thread setPosts(Post p0){
    this.posts = p0;
    return this;
  }

  public String toString(){
    StringBuilder builder = new StringBuilder();
    builder.append("forum=").append(this.forum).append(", ");
    builder.append("subject=").append(this.subject).append(", ");
    builder.append("posts=").append(this.posts).append(", ");
    return builder.toString();
  }
}